<template>
  <div class="helloworld">
    <button type="button" @click="addCount">pinia持久化仓库count状态：{{ count }}</button>
  </div>
</template>

<script setup>
import { computed, ref } from 'vue'
import { useExampleStore } from '@/store/example.js'

const exampleStore = useExampleStore()
const count = computed(() => {
  return exampleStore.getCount()
})

function addCount() {
  exampleStore.countAdd(1)
}

</script>

<style scoped></style>
